package com.java.controller;

import com.java.dto.UserRoleDTO;
import com.java.model.Result;
import com.java.service.UserRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/userRole")
public class UserRoleController {

    @Autowired
    private UserRoleService userRoleService;

    @PostMapping("/save")
    @ResponseBody
    public Result save(@RequestBody UserRoleDTO userRoleDTO) {
        return userRoleService.save(userRoleDTO);
    }
}
